<template>
  <div>
    <!-- <span v-click-Outside="close">test</span> -->
    <span v-ClickOutside="close">test</span>
  </div>
</template>

<script setup>
import vClickOutside from "element-plus/es/directives/click-outside/index.mjs";
const close = () => {
  console.log("外部被点击了");
};
</script>

<style lang="scss" scoped></style>

<!-- <template>
  <div>
    <span v-clickoutside="close">test</span>
  </div>
</template>

<script>
import clickoutside from "element-plus/es/directives/click-outside/index.mjs";
export default {
  directives: { clickoutside },
  setup() {
    const close = () => {
      console.log("外部被点击了");
    };
    return { close };
  },
};
</script>

<style lang="scss" scoped></style> -->
